package com.goulin.sprmvc.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.goulin.sprmvc.service.DemoTestService;

@RestController
public class DemoTestController {

	@Autowired
	DemoTestService demoTestService;
	
	@RequestMapping(value="/testRest",produces="text/plain;charset=UTF-8")
	public @ResponseBody String testPage(Model model){
		return demoTestService.saySomething();
	}
	
}
